﻿/*
 * Created by SharpDevelop.
 * User: CeCi
 * Date: 23/03/2014
 * Time: 11:01
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Linq;

namespace Gestión_UTN.View.main
{
	/// <summary>
	/// Description of MainAlumnos.
	/// </summary>
	public partial class MainAlumnos : Form
	{
		public MainAlumnos()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		void PctNuevoMouseHover(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Nuevo Alumno";
		}
		
		void PctNuevoMouseLeave(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Pantalla Inicial";
		}
		
		void PctEliminarMouseHover(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Eliminar Alumno";
		}
		
		void PctEliminarMouseLeave(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Pantalla Inicial";
		}
		
		void PctBuscarMouseHover(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Buscar Alumno";
		}
		
		void PctBuscarMouseLeave(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Pantalla Inicial";
		}
		
		void PctListadoMouseHover(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Listado de Alumnos";
		}
		
		void PctListadoMouseLeave(object sender, EventArgs e)
		{
			this.lblStatus.Text = "Pantalla Inicial";
		}
		
		void PctNuevoClick(object sender, EventArgs e)
		{
			Form existe = Application.OpenForms.OfType<Form>().Where(pre => pre.Name == "AltaAlumno").SingleOrDefault<Form>();
			
			if (existe != null) {
				
				existe.WindowState = FormWindowState.Normal;
			}
			else
			{
				Gestión_UTN.View.alta.AltaAlumno alta = new Gestión_UTN.View.alta.AltaAlumno();
				alta.StartPosition = FormStartPosition.CenterScreen;
				alta.Show();
			}
				
		}
	}
}
